home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / amos / amosl0794.lzh / AMOSLIST / 000086_amos-request@svcs1.digex.net_Sat Jul 23 14:31:42 1994.msg < prev    next >
Internet Message Format  |  1994-08-01  |  2KB

  1. Received: from hela.INS.CWRU.Edu by nfs1.digex.net with SMTP id AA19068
  2.   (5.67b8/IDA-1.5 for <mcox@access.digex.net>); Sat, 23 Jul 1994 14:31:40 -0400
  3. Received: from svcs1.digex.net (svcs1.digex.net [164.109.10.23]) by hela.INS.CWRU.Edu with SMTP (8.6.8.1+cwru/CWRU-2.1-freenet-gw)
  4.     id OAA14692; Sat, 23 Jul 1994 14:31:24 -0400 (from amos-request@svcs1.digex.net)
  5. Received: by svcs1.digex.net id AA00908
  6.   (5.67b8/IDA-1.5 for amos-out); Sat, 23 Jul 1994 12:43:39 -0400
  7. Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA00904
  8.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Sat, 23 Jul 1994 12:43:36 -0400
  9. Received: from access1.digex.net by nfs1.digex.net with SMTP id AA15856
  10.   (5.67b8/IDA-1.5 for <amos-list@access.digex.com>); Sat, 23 Jul 1994 12:43:34 -0400
  11. Received: by access1.digex.net id AA22497
  12.   (5.67b8/IDA-1.5 for amos-list@access.digex.com); Sat, 23 Jul 1994 12:43:33 -0400
  13. From: M D Cox <mcox>
  14. Message-Id: <199407231643.AA22497@access1.digex.net>
  15. Subject: PIPEing
  16. To: amos-list@access.digex.net (AMOS Mailing List)
  17. Date: Sat, 23 Jul 1994 12:43:33 -0400 (ADT)
  18. X-Mailer: ELM [version 2.4 PL23]
  19. Mime-Version: 1.0
  20. Content-Type: text/plain; charset=US-ASCII
  21. Content-Transfer-Encoding: 7bit
  22. Content-Length: 760       
  23. Status: RO
  24.  
  25. Has anyone ever written a program to accept STDIN or piping?  For
  26. instance, if I wrote a program called WC that would count the number of words
  27. and lines in a text file, would I be able to:
  28.  
  29. type textfile.txt > WC
  30.  
  31. or
  32.  
  33. type textfile.txt | WC
  34.  
  35. I know i can do: WC textfile.txt, but then could I do:
  36.  
  37. WC textfile.txt > result.txt
  38.  
  39. with result.txt being created and containing the output of WC?
  40.  
  41. If anyone is familiar with programs like AWK or GREP, help me out if you
  42. can, please!  :)
  43.  
  44. Mike
  45. -- 
  46. Michael Cox                             Work:   mcox@access.digex.net
  47. A1200/120 w/1230XA 50/50/4 = SPEED!     Play:   aj639@Cleveland.FreeNet.EDU
  48.              For info on the AMOS Mailing List, contact me!
  49.              For AMOS Pro news, finger mcox@access.digex.net